package cn.tedu.crm.notice.mapper;

import cn.tedu.crm.notice.pojo.dto.NoticeQuery;
import cn.tedu.crm.notice.pojo.entity.Notice;
import cn.tedu.crm.notice.pojo.vo.NoticeVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NoticeMapper extends BaseMapper<Notice> {
    List<NoticeVO> selectByUserId(NoticeQuery noticeQuery);

    int insert(Notice notice);

    List<NoticeVO> selectByIdAndUserId(@Param("id") Long id, @Param("userId") Long userId);

    void update(Notice notice);

    void deleteById( Long id);

    List<NoticeVO> selectByStatus(NoticeQuery noticeQuery);

    Long selectNoticeCount(NoticeQuery noticeQuery);
}
